package com.ds.rabbitmq.controller;

import com.ds.rabbitmq.entity.User;
import com.ds.rabbitmq.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springboot-1-cache
 * @description:
 * @author: Dawson.Zhang
 * @create: 2020-05-28
 **/
@RestController
public class UserController {
    @Autowired
    UserService userService;
    @GetMapping
    public String getUser(User user){
        userService.send(user);
        return user.toString();
    }
}
